<template>
  <div id='DetailBottom' class='DetailBottom'>
    <div class="btn-icon fl">

      <p>
        <i class="icon1"></i>
        <span>客服</span>
      </p>
      <p>
        <i class="icon2"></i>
        <span>店铺</span>
      </p>
      <p>
        <i class="icon3"></i>
        <span>收藏</span>
      </p>
    </div>
    <div class="cart fl" @click="addToCart">加入购物车</div>
    <div class="buy fl" @click="goCart">购买</div>
  </div>
</template>

<script>
  export default {
    name: 'DetailBottom',
    props: { // 父辈向子辈传参
    },
    components: { // 组件的引用

    },
    data() {
      return {

      }
    },
    methods: { // 方法
      addToCart() {
        this.$emit('addToCart')
      },
      goCart() {
        path: this.$router.push('/cart')
      }
    },
    computed: { // 计算属性

    },
    created() { // 实例被创建之后执行代码

    },
    mounted() { // 页面进入时加载内容

    },
    watch: { // 监测变化

    }
  }

</script>
<style scoped>
  .DetailBottom {
    height: 55px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: -1px;
    background: white;
  }

  .btn-icon {
    width: 50%;
    height: 100%;
    display: flex;
    flex: 1;
    color: #666;
    text-align: center;
    font-size: 15px;
  }

  .btn-icon p {

    flex: 1;
    height: 100%;
    position: relative;
    line-height: 55px;
  }

  .btn-icon i {
    margin-left: 7px;
    margin-top: 9px;
    float: left;
    width: 25px;
    height: 33px;
    background: url('../../../assets/img/detail/detail_bottom.png')no-repeat;
    background-size: 25px 175px;


  }

  .btn-icon span {
    float: left;
  }


  .btn-icon .icon1 {
    background-position: 0px -58px;
  }

  .btn-icon .icon2 {
    background-position: 0px -110px;
  }

  .btn-icon .icon3 {
    background-position: 0px 6px;
  }

  .cart {

    width: 28%;
    height: 55px;
    line-height: 55px;
    background: rgba(255, 223, 13);
    text-align: center;
    color: #363232;
    font-size: 18px;
  }

  .buy {
    width: 22%;
    height: 55px;
    line-height: 55px;
    background: var(--color-high-text);
    text-align: center;
    color: white;
  }

</style>
